home *** CD-ROM | disk | FTP | other *** search
/ PCMania 64 / PCMania CD64_1.iso / phy / phy006 / lowlevel / trucosp.asm < prev    next >
Encoding:
Assembly Source File  |  1997-08-29  |  2.6 KB  |  86 lines

  1. .model tiny
  2. locals
  3. .386
  4. .code
  5.  
  6.                 org     100h
  7.  
  8. Main                    proc
  9.                         push    di
  10.                         mov     di, offset RegAX
  11.                         mov     ax, ss
  12.                         call    Ponlo
  13.                         push    ss
  14.                         pop     ax
  15.                         mov     di, offset RegBX
  16.                         call    Ponlo
  17.                         mov     ax, cx
  18.                         mov     di, offset RegCX
  19.                         call    Ponlo
  20.                         mov     ax, dx
  21.                         mov     di, offset RegDX
  22.                         call    Ponlo
  23.                         mov     ax, si
  24.                         mov     di, offset RegSI
  25.                         call    Ponlo
  26.                         pop     di
  27.                         mov     ax, di
  28.                         mov     di, offset RegDI
  29.                         call    Ponlo
  30.                         mov     ax, bp
  31.                         mov     di, offset RegBP
  32.                         call    Ponlo
  33.                         mov     ah, 09
  34.                         mov     dx, offset Mensaje
  35.                         int     21h
  36.                         ret
  37. Main                    endp
  38.  
  39. Ponlo                   proc
  40.                         mov     byte ptr [control], 0
  41.                         jmp     Salto
  42.            Salto2:      mov     byte ptr [control], 1
  43.            Salto:       push    ax
  44.                         mov     al, ah
  45.                         and     ax, 0f00fh
  46.                         shr     ah, 4
  47.                         xchg    ah, al
  48.                         add     al, 30h
  49.                         cmp     al, 39h
  50.                         jbe     Salto3
  51.                         add     al, 7
  52.           Salto3:       stosb
  53.                         xchg    ah, al
  54.                         add     al, 30h
  55.                         cmp     al, 39h
  56.                         jbe     Salto4
  57.                         add     al, 7
  58.           Salto4:       stosb
  59.                         pop     ax
  60.                         cmp     byte ptr [control], 1
  61.                         jz      Acaba
  62.                         xchg    ah, al
  63.                         jmp     Salto2
  64.             Acaba:      ret
  65. Ponlo                   endp
  66.  
  67. Control db      0
  68.  
  69. Mensaje db 'AX='
  70. RegAX   dd 0
  71.         db ' BX='
  72. RegBX   dd 0
  73.         db ' CX='
  74. RegCX   dd 0
  75.         db ' DX='
  76. RegDX   dd 0
  77.         db ' SI='
  78. RegSI   dd 0
  79.         db ' DI='
  80. RegDI   dd 0
  81.         db ' BP='
  82. RegBP   dd 0
  83.         db '$'
  84.  
  85.                         end     Main
  86.